  function getQueryString(name) {
    var reg =new RegExp("(^|&)"+ name +"=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r !=null) return unescape(r[2]); returnnull;
  }
  // var currentDate = new Date();
  // var strEndTime = getQueryString("EndTime");
  // var EndTime=new Date(strEndTime);
  
  // var days= EndTime - currentDate; 
  // EndTimeMsg = parseInt(days / 1000);//精确到秒

/**
*Author:Mr Liu
*倒计时时间 - X天X时X分X秒 减减
*EndTime 格式 EndTime=2012/10/23 10:20:30
*DD html中天对应的ID
*HH html中时对应的ID
*MM html中分对应的ID
*SS html中秒对应的ID
*setInterval(function(){countDownTime('2015/07/23 10:20:30','DD','HH','MM','SS');}, 1000);
**/
function countDownTime(EndTime,DD,HH,MM,SS) {    
	var currentDate = new Date();    
	var EndTime=new Date(EndTime);
	var days= EndTime - currentDate; 
	EndTimeMsg = parseInt(days / 1000);//精确到秒 
	h = Math.floor(EndTimeMsg / 60 / 60);
	m = Math.floor((EndTimeMsg - h * 60 * 60) / 60);
	s = Math.floor((EndTimeMsg - h * 60 * 60 - m * 60));   
	document.getElementById(DD).innerHTML = parseInt(h/24);
	document.getElementById(HH).innerHTML = h-parseInt(h/24)*24;
	document.getElementById(MM).innerHTML = m;
	document.getElementById(SS).innerHTML = s;
	EndTimeMsg--;
	if (EndTimeMsg < 0){
	    document.getElementById(DD).innerHTML = "0";
	    document.getElementById(HH).innerHTML = "0";
	    document.getElementById(MM).innerHTML = "0";
	    document.getElementById(SS).innerHTML = "0";
	}
}  

function allDown(EndTimeArr,DD,HH,MM,SS){
	var DD = arguments[1] ? arguments[1] : 'DD';
	var HH = arguments[2] ? arguments[2] : 'HH';	
	var MM = arguments[3] ? arguments[3] : 'MM';
	var SS = arguments[4] ? arguments[4] : 'SS';		
	var EndTimeArrLen = EndTimeArr.length;

	for(var i=0 ;i<EndTimeArrLen ; i++){
		var EndTimeArrSplit	= EndTimeArr[i].split('-');                
		countDownTime(EndTimeArrSplit[1],DD+EndTimeArrSplit[0],HH+EndTimeArrSplit[0],MM+EndTimeArrSplit[0],SS+EndTimeArrSplit[0]);
	}
}